package pojo;

import utils.TimeUtil;

import java.time.LocalDateTime;

public class Admin {
    private Integer id; //id
    private String username; //用户名
    private String password; //密码
    private LocalDateTime create_time; //创建时间
    private LocalDateTime update_time; //最后更新时间

    public Admin() {
    }

    public Admin(Integer id, String username, String password, LocalDateTime create_time, LocalDateTime update_time) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.create_time = create_time;
        this.update_time = update_time;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public LocalDateTime getCreate_time() {
        return create_time;
    }

    public void setCreate_time(LocalDateTime create_time) {
        this.create_time = create_time;
    }

    public LocalDateTime getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(LocalDateTime update_time) {
        this.update_time = update_time;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "id=" + id +
                ", 用户名='" + username + '\'' +
                ", 创建时间=" + TimeUtil.localDateTimeToMysqlFormat(create_time) +
                ", 最后修改时间=" + TimeUtil.localDateTimeToMysqlFormat(update_time) +
                '}';
    }
}
